Open skorfmann opened 3 weeks ago
Heyπ thanks for raising this! I'm going to transfer this over to our backend repository as this is Gen 2 related.
Quickly tried reproducing this using the following
backend.ts
const backend = defineBackend({
auth,
data,
myApiFunction,
});
backend.data.resources.cfnResources.cfnGraphqlApi.xrayEnabled = true;
const { amplifyDynamoDbTables } = backend.data.resources.cfnResources;
for (const table of Object.values(amplifyDynamoDbTables)) {
table.pointInTimeRecoveryEnabled = true;
}
data/resource.ts
Todo: a.model({
R: a.integer().required(),
B: a.integer().required(),
Four: a.integer().required(),
Six: a.integer().required(),
}),
test this on a new app and existing app but did not run into this error.
From the message Backups are being enabled for the table
and the documentation it appears a different process is creating the PITR. was there a pervious build that attempted to enable this or was there any manual changes on the console?
om the message
Backups are being enabled for the table
and the documentation it appears a different process is creating the PITR. was there a pervious build that attempted to enable this or was there any manual changes on the console?
Not that I'm aware, I had the amplify sandbox (continuous local sync) running locally, which worked fine. Then when creating the app from scratch in Amplify Hosting I ran into this. Haven't tried to reproduce it again so far. However, the code is public https://github.com/cdk-dev/website/ :)
Hey @skorfmann, thank you for information. Tried forking the repository and enabling the PITR, but did not observe this error. If the issue re-occurs could check the CloudForamtion stack events and the DynamoDB table(PITR tab) on the AWS console if there are any observations that would assist in documenting this behavior.
Hi @skorfmann π , just checking in to see whether you are continuing to observe the Backups are being enabled for the table
error during the deployment or are you now unblocked?
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
20
Amplify CLI Version
not sure
What operating system are you using?
mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
import { defineBackend } from '@aws-amplify/backend'; import { auth } from './auth/resource'; import { data } from './data/resource'; import { storage } from './storage/resource';
/**
const dataResources = backend.data.resources;
dataResources.cfnResources.cfnGraphqlApi.xrayEnabled = true; Object.values(dataResources.cfnResources.amplifyDynamoDbTables).forEach((table) => { table.pointInTimeRecoveryEnabled = true; });
Describe the bug
when enabling PIR it seems to fail when deploying from scratch, but works iteratively
Expected behavior
always works
Reproduction steps
enable the PIR and deploy from scratch
Project Identifier
No response
Log output
Additional information
System: OS: macOS 14.4.1 CPU: (12) arm64 Apple M2 Max Memory: 122.33 MB / 32.00 GB Shell: /bin/zsh Binaries: Node: 20.10.0 - ~/.volta/tools/image/node/20.10.0/bin/node Yarn: 1.22.21 - ~/.volta/tools/image/yarn/1.22.21/bin/yarn npm: 10.2.3 - ~/.volta/tools/image/node/20.10.0/bin/npm pnpm: 9.1.4 - ~/Library/pnpm/pnpm NPM Packages: @aws-amplify/backend: 1.0.3 @aws-amplify/backend-cli: 1.0.4 aws-amplify: 6.3.6 aws-cdk: 2.145.0 aws-cdk-lib: 2.145.0 typescript: 5.4.5 AWS environment variables: AWS_PROFILE = sandbox AWS_STS_REGIONAL_ENDPOINTS = regional AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1 AWS_SDK_LOAD_CONFIG = 1
Before submitting, please confirm: