If you want to have user-level access for an indvidual bucket (or other resource), create an IAM policy scoped to that individual resource (or the whole class of resources if…
Posts for: #Aws
How to Pass Arguments to Training Code in Sagemaker via a Step Function
To pass arguments to training code in Sagemaker by itself or via a Step Function, set up an argument parser in the Python script with keyword arguments.
Rebuilding Missing Resources in CDK
In AWS CDK, if a resource like a DynamoDB table is missing (maybe it was accidentally manually deleted) with a ResourceNotFound or Unable to retrieve arn error, you can recover…
AWS Lambda Return Values for API Triggering
A Lambda triggered by an API has to return a dictionary with certain keys and values in order to not cause an error in execution (e.g. “malformed lambda proxy response”). These…
Passing Secrets into Lambdas in CDK
same: AWS Lambda Return Values for API Triggering, To Build a Lambda from a Dockerfile in CDK
Install Specific CDK Version And-Or By Project
You can install the CDK toolkit for a specific project by omitting -g from the npm install command then invoking it with npx aws-cdk. You can also install the toolkit for a…
AWS API Gateway Changes Break Deployment
If you try to rename a parameter in a deployed API Gateway object via CDK, deployment will break (you won’t be able to deploy the change). This seems to do with how…
DynamoDB Index Read and Write Capacity in PynamoDB
When setting up a Global Secondary Index model in PynamoDB, the read and write capacity units have to be specified. These are not needed if not provisioning a table or index,…
PynamoDB Field Aliases
To give an alias to DynamoDB field with PynamoDB, use the attrname parameter for the appropriate attribute constructor: python class Thread(Model): class Meta: tablename =…
PynamoDB Arguments
In PynamoDB, when running a DynamoDB query, the first two positional arguments are the hash key (primary key) and filters for the range key (sort key). To do a filter…