Skip to content

Flag --profile is ignored #114

@zileangrado

Description

@zileangrado

I've set up a profile in ~/.aws/config that looks like this:

[profile localstack]
region=eu-west-1
output=json
endpoint_url=http://localhost:4566

And in ~/.aws/credentials I have:

[localstack]
aws_access_key_id=test
aws_secret_access_key=test
aws_default_region=eu-west-1

When I run cdklocal with --profile localstack (which is supported by cdk), the profile flag seems to be ignored as the resources are deployed in the US region.

This can be worked around by exporting the following env variables:

export AWS_REGION=eu-west-1
export AWS_ENVAR_ALLOWLIST=AWS_REGION

However, it would be better to support --profile to be consistent with cdk and be able to use the same flags regardless of the target (and avoid polluting the env with more variables depending on the use case).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions