aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.58k stars 3.88k forks source link

(appconfig-alpha): grant read Configuration #28585

Closed yamatatsu closed 4 months ago

yamatatsu commented 9 months ago

Describe the feature

Now appconfig-alpha has no grant method. If grantReadConfig() is implemented, it will be useful.

Use Case

Using AppConfig from application codes.

Proposed Solution

environment.grantReadConfig(lambdaFunction);

Other Information

Needed policy is following:

new iam.PolicyStatement({
  actions: [
    "appconfig:GetLatestConfiguration",
    "appconfig:StartConfigurationSession",
  ],
  resources: [`${appConfigEnvironment.environmentArn}/*`],
})

see, https://docs.aws.amazon.com/appconfig/latest/userguide/about-data-plane.html

Acknowledgements

CDK version used

2.114.1

Environment details (OS name and version, etc.)

Mac OS, Apple silicon, Sonoma 14.2.1

pahud commented 9 months ago

Absolutely! Thank you @yamatatsu !

github-actions[bot] commented 4 months ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.