Aws-cli: Unable to create FIFO queue: "Unknown Attribute FifoQueue"

Created on 14 Apr 2017  路  7Comments  路  Source: aws/aws-cli

According to the latest docs for aws sqs create-queue, the FifoQueue and ContentBasedDeduplication attributes are both valid, and are required to create a FIFO queue. However, the cli receives an Unknown Attribute error when trying to create one.

CLI version:

$ aws --version
aws-cli/1.11.76 Python/2.7.10 Darwin/15.4.0 botocore/1.5.39

Command executed:

$ aws sqs create-queue --queue-name my-queue.fifo --attributes "{\"FifoQueue\":\"true\",\"ContentBasedDeduplication\":\"false\"}" --debug

Debug output:

2017-04-14 10:42:17,001 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.11.76 Python/2.7.10 Darwin/15.4.0 botocore/1.5.39
2017-04-14 10:42:17,001 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['sqs', 'create-queue', '--queue-name', 'my-queue.fifo', '--attributes', '{"FifoQueue":"true","ContentBasedDeduplication":"false"}', '--debug']
2017-04-14 10:42:17,001 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x10d794140>
2017-04-14 10:42:17,001 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x10d4b6668>
2017-04-14 10:42:17,002 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/botocore/data/sqs/2012-11-05/service-2.json
2017-04-14 10:42:17,006 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.sqs: calling handler <function register_retries_for_service at 0x10d080758>
2017-04-14 10:42:17,006 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: sqs
2017-04-14 10:42:17,006 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sqs: calling handler <function add_waiters at 0x10d79c230>
2017-04-14 10:42:17,009 - MainThread - awscli.clidriver - DEBUG - OrderedDict([(u'queue-name', <awscli.arguments.CLIArgument object at 0x10db18650>), (u'attributes', <awscli.arguments.CLIArgument object at 0x10db18710>)])
2017-04-14 10:42:17,009 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.sqs.create-queue: calling handler <function add_streaming_output_arg at 0x10d794398>
2017-04-14 10:42:17,009 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.sqs.create-queue: calling handler <function add_cli_input_json at 0x10d4c3488>
2017-04-14 10:42:17,009 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.sqs.create-queue: calling handler <function unify_paging_params at 0x10d712a28>
2017-04-14 10:42:17,012 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/botocore/data/sqs/2012-11-05/paginators-1.json
2017-04-14 10:42:17,012 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.sqs.create-queue: calling handler <function add_generate_skeleton at 0x10d6fade8>
2017-04-14 10:42:17,012 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.sqs.create-queue: calling handler <bound method CliInputJSONArgument.override_required_args of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x10db18850>>
2017-04-14 10:42:17,012 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.sqs.create-queue: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x10da7d210>>
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.sqs.create-queue.queue-name: calling handler <function uri_param at 0x10d34c848>
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.sqs.create-queue: calling handler <awscli.argprocess.ParamShorthandParser object at 0x10d79d910>
2017-04-14 10:42:17,013 - MainThread - awscli.arguments - DEBUG - Unpacked value of u'my-queue.fifo' for parameter "queue_name": u'my-queue.fifo'
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.sqs.create-queue.attributes: calling handler <function uri_param at 0x10d34c848>
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.sqs.create-queue: calling handler <awscli.argprocess.ParamShorthandParser object at 0x10d79d910>
2017-04-14 10:42:17,013 - MainThread - awscli.argprocess - DEBUG - Param attributes looks like JSON, not considered for param shorthand.
2017-04-14 10:42:17,013 - MainThread - awscli.arguments - DEBUG - Unpacked value of u'{"FifoQueue":"true","ContentBasedDeduplication":"false"}' for parameter "attributes": OrderedDict([(u'FifoQueue', u'true'), (u'ContentBasedDeduplication', u'false')])
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.sqs.create-queue.cli-input-json: calling handler <function uri_param at 0x10d34c848>
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.sqs.create-queue.generate-cli-skeleton: calling handler <function uri_param at 0x10d34c848>
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event calling-command.sqs.create-queue: calling handler <bound method CliInputJSONArgument.add_to_call_parameters of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x10db18850>>
2017-04-14 10:42:17,013 - MainThread - botocore.hooks - DEBUG - Event calling-command.sqs.create-queue: calling handler <bound method GenerateCliSkeletonArgument.generate_json_skeleton of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x10da7d210>>
2017-04-14 10:42:17,013 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2017-04-14 10:42:17,013 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role
2017-04-14 10:42:17,013 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file
2017-04-14 10:42:17,014 - MainThread - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials
2017-04-14 10:42:17,014 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/botocore/data/endpoints.json
2017-04-14 10:42:17,024 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: sqs
2017-04-14 10:42:17,024 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.sqs: calling handler <function add_generate_presigned_url at 0x10d0495f0>
2017-04-14 10:42:17,025 - MainThread - botocore.args - DEBUG - The s3 config key is not a dictionary type, ignoring its value of: None
2017-04-14 10:42:17,032 - MainThread - botocore.endpoint - DEBUG - Setting sqs timeout as (60, 60)
2017-04-14 10:42:17,032 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.sqs.CreateQueue: calling handler <function generate_idempotent_uuid at 0x10d0801b8>
2017-04-14 10:42:17,032 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=CreateQueue) (verify_ssl=True) with params: {'body': {u'Attribute.2.Name': u'ContentBasedDeduplication', u'Attribute.1.Value': u'true', u'Attribute.2.Value': u'false', 'Version': u'2012-11-05', 'Action': u'CreateQueue', u'Attribute.1.Name': u'FifoQueue', u'QueueName': u'my-queue.fifo'}, 'url': u'https://queue.amazonaws.com/', 'headers': {'User-Agent': 'aws-cli/1.11.76 Python/2.7.10 Darwin/15.4.0 botocore/1.5.39'}, 'context': {'auth_type': None, 'client_region': 'us-east-1', 'has_streaming_input': False, 'client_config': <botocore.config.Config object at 0x10dc7b9d0>}, 'query_string': '', 'url_path': '/', 'method': u'POST'}
2017-04-14 10:42:17,032 - MainThread - botocore.hooks - DEBUG - Event request-created.sqs.CreateQueue: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x10dc7b990>>
2017-04-14 10:42:17,032 - MainThread - botocore.hooks - DEBUG - Event choose-signer.sqs.CreateQueue: calling handler <function set_operation_specific_signer at 0x10d0800c8>
2017-04-14 10:42:17,033 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2017-04-14 10:42:17,033 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/

host:queue.amazonaws.com
x-amz-date:20170414T144217Z

host;x-amz-date
4f241c51a703010f531ffe41a2150cd91dd770627485cb7996a007796d87a6c3
2017-04-14 10:42:17,033 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20170414T144217Z
20170414/us-east-1/sqs/aws4_request
79b98b56db7d26c655a2a2e0849c826c2b0b542ecb48678e2c411879294b075b
2017-04-14 10:42:17,033 - MainThread - botocore.auth - DEBUG - Signature:
ed155dbd056eb38d2ebb761aff42b7b2b738e2a52ae14a7dd3d4e638d8f5cf52
2017-04-14 10:42:17,035 - MainThread - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [POST]>
2017-04-14 10:42:17,035 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): queue.amazonaws.com
2017-04-14 10:42:17,626 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - DEBUG - "POST / HTTP/1.1" 400 285
2017-04-14 10:42:17,627 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amzn-requestid': '61feb0b1-2852-5ea0-9c2d-e1dbca5b36b0', 'content-length': '285', 'server': 'Server', 'connection': 'keep-alive', 'date': 'Fri, 14 Apr 2017 14:42:17 GMT', 'content-type': 'text/xml'}
2017-04-14 10:42:17,627 - MainThread - botocore.parsers - DEBUG - Response body:
<?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>InvalidAttributeName</Code><Message>Unknown Attribute FifoQueue.</Message><Detail/></Error><RequestId>61feb0b1-2852-5ea0-9c2d-e1dbca5b36b0</RequestId></ErrorResponse>
2017-04-14 10:42:17,627 - MainThread - botocore.hooks - DEBUG - Event needs-retry.sqs.CreateQueue: calling handler <botocore.retryhandler.RetryHandler object at 0x10da5ac50>
2017-04-14 10:42:17,627 - MainThread - botocore.retryhandler - DEBUG - No retry needed.
2017-04-14 10:42:17,628 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "/usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/awscli/clidriver.py", line 199, in main
    return command_table[parsed_args.command](remaining, parsed_args)
  File "/usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/awscli/clidriver.py", line 337, in __call__
    return command_table[parsed_args.operation](remaining, parsed_globals)
  File "/usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/awscli/clidriver.py", line 507, in __call__
    call_parameters, parsed_globals)
  File "/usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/awscli/clidriver.py", line 626, in invoke
    client, operation_name, parameters, parsed_globals)
  File "/usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/awscli/clidriver.py", line 638, in _make_client_call
    **parameters)
  File "/usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/botocore/client.py", line 253, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/Cellar/awscli/1.11.76/libexec/lib/python2.7/site-packages/botocore/client.py", line 544, in _make_api_call
    raise error_class(parsed_response, operation_name)
InvalidAttributeName: An error occurred (InvalidAttributeName) when calling the CreateQueue operation: Unknown Attribute FifoQueue.
2017-04-14 10:42:17,630 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255

An error occurred (InvalidAttributeName) when calling the CreateQueue operation: Unknown Attribute FifoQueue.
closing-soon guidance service-api

Most helpful comment

That'll be the problem, FIFO queues are only available in two regions currently: us-east-2 and us-west-2

All 7 comments

It looks like you don't have a default region configured and aren't passing in a region on the command line. Try setting that and see what you get.

Thanks for looking into this. I've confirmed that I have a default set:

$ aws configure
AWS Access Key ID [****************F2RA]: 
AWS Secret Access Key [****************06Mj]: 
Default region name [us-east-1]: 
Default output format [json]: 

And it appears that it's set correctly in the debug output:

'context': {'auth_type': None, 'client_region': 'us-east-1' ...

If I set AWS_REGION=us-east-1 on the command line, I get the same error as before.

That'll be the problem, FIFO queues are only available in two regions currently: us-east-2 and us-west-2

Ah, that's unfortunate. It would be a perfect fit for our use-case. Thanks for the quick response on this! I'll share the details with our ops team.

Follow up issue: https://stackoverflow.com/questions/44892570/aws-sqs-cli-input-json-does-not-recognize-attribute-fifoqueue

The detailed output attached(1st and 2nd work and 3rd failed)
AWS Bug.txt

Does anyone know when will it be available on sa-east-1?

Was this page helpful?
0 / 5 - 0 ratings